package com.sd.repay.service;


import com.sd.repay.pojo.RepayPlanDetail;

import java.util.List;
import java.util.Map;

/**
 * @author sd
 * @Description: 还款计划明细Service接口
 * @date 2017年10月25日
 */
public interface RepayPlanDetailService {

    List<RepayPlanDetail> getDetailByBatchNo(String batchNo) throws Exception;

    RepayPlanDetail getDetailByPlanNo(String planNo) throws Exception;

    RepayPlanDetail getNextExeuteDetailByBatchNo(String batchNo) throws Exception;

    RepayPlanDetail getPrevSuccessDetailByBatchNo(String batchNo, int planIndex) throws Exception;

    List<RepayPlanDetail> getDetailByBatchNoAndStatus(String batchNo, String status) throws Exception;

    RepayPlanDetail getFirstDetail(String batchNo) throws Exception;

    int updateDetailStatus(String planNo, String newStatus, String oldStatus, String resMsg) throws Exception;

    boolean isLastIndexDetail(String batchNo, int planIndex) throws Exception;

    List<RepayPlanDetail> getDetailDoingAndDone(String batchNo) throws Exception;

    int incrementDetailCount(String planNo) throws Exception;

    int resertDetailCount(String planNo) throws Exception;

    Map<String, Object> countInfoByBatchAndTypeAndStatus(String batchNo, String detailType, String detailStatus);

}
